﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmEstablecimiento.aspx.cs" Inherits="frmEstablecimiento" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style3
        {
            color: #0000CC;
        }
        .style4
        {
            color: #000000;
        }
        .style10
        {
            width: 444px;
        }
        .style12
        {
            width: 107%;
            height: 300px;
        }
        .style13
        {
            height: 74px;
            width: 483px;
        }
        .style15
        {
            width: 444px;
            height: 74px;
        }
        .style16
        {
            width: 483px;
        }
        .style17
        {
            width: 15px;
        }
        .style18
        {
            width: 15px;
            height: 74px;
        }
        .style20
        {
             position: absolute;
            left: 877px;
            top: 478px;
            width: 239px;
            height: 29px;
        }
       
        .style21
        {
            position: absolute;
            left: 606px;
            top: 210px;
        }
       
        .style22
        {
            position: absolute;
            left: 607px;
            top: 238px;
        }
        .style23
        {
            position: absolute;
            left: 343px;
            top: 200px;
        }
        .style24
        {
            position: absolute;
            top: 210px;
            z-index: 1;
            left: 272px;
        }
        .style25
        {
            position: absolute;
            top: 241px;
            left: 292px;
            z-index: 1;
        }
       
        .style26
        {
            position: absolute;
            left: 672px;
            top: 338px;
        }
        .style27
        {
            position: absolute;
            left: 314px;
            top: 332px;
            width: 349px;
        }
        .style28
        {
            position: absolute;
            top: 339px;
            left: 208px;
            z-index: 1;
        }
       
        .style29
        {
            position: absolute;
            left: 314px;
            top: 365px;
            width: 120px;
        }
        .style30
        {
            position: absolute;
            top: 371px;
            left: 217px;
            z-index: 1;
        }
       
        .style31
        {
            position: absolute;
            left: 520px;
            top: 368px;
            height: 30px;
            width: 140px;
        }
        .style32
        {
            position: absolute;
            top: 370px;
            left: 445px;
            z-index: 1;
            width: 70px;
        }
       
        .style33
        {
            position: absolute;
            left: 313px;
            top: 402px;
            width: 351px;
        }
       
        .style34
        {
            position: absolute;
            left: 673px;
            top: 407px;
        }
        .style35
        {
            position: absolute;
            top: 409px;
            left: 248px;
            z-index: 1;
        }
       
        .style36
        {
            position: absolute;
            left: 312px;
            top: 437px;
            width: 352px;
        }
        .style37
        {
            position: absolute;
            top: 444px;
            z-index: 1;
            left: 260px;
        }
       
        .style38
        {
            position: absolute;
            left: 468px;
            top: 485px;
            width: 52px;
            height: 20px;
        }
        .style39
        {
            position: absolute;
            top: 214px;
            left: 1046px;
            z-index: 1;
        }
       
        .style40
        {
            position: absolute;
            left: 1092px;
            top: 214px;
        }
       
        .style41
        {
            position: absolute;
            left: 880px;
            top: 313px;
        }
       
        .style42
        {
            position: absolute;
            left: 1218px;
            top: 319px;
        }
       
        .style43
        {
            position: absolute;
            left: 1133px;
            top: 316px;
            width: 77px;
        }
       
        .style44
        {
            position: absolute;
            left: 1136px;
            top: 354px;
        }
        .style45
        {
            position: absolute;
            top: 321px;
            left: 819px;
            z-index: 1;
        }
        .style46
        {
            position: absolute;
            top: 321px;
            left: 1104px;
            z-index: 1;
        }
        .style47
        {
            position: absolute;
            top: 354px;
            left: 824px;
            z-index: 1;
        }
       
        .style48
        {
            position: absolute;
            left: 879px;
            top: 348px;
            width: 98px;
        }
       
        .style49
        {
            position: absolute;
            left: 1028px;
            top: 348px;
            width: 100px;
        }
        .style50
        {
            position: absolute;
            top: 353px;
            left: 989px;
            z-index: 1;
        }
       
        .style51
        {
            position: absolute;
            left: 878px;
            top: 380px;
            width: 99px;
        }
        .style52
        {
            position: absolute;
            top: 389px;
            left: 789px;
            z-index: 1;
        }
        .style53
        {
            position: absolute;
            top: 478px;
            left: 820px;
            z-index: 1;
        }
        .style54
        {
            position: absolute;
            top: 455px;
            left: 801px;
            z-index: 1;
        }
        .style55
        {
            position: absolute;
            top: 430px;
            left: 809px;
            z-index: 1;
        }
       
        .style56
        {
            position: absolute;
            left: 344px;
            top: 235px;
            height: 30px;
        }
       
        .style57
        {
            position: absolute;
            left: 877px;
            top: 453px;
            width: 237px;
            height: 29px;
        }
       
        .style58
        {
            position: absolute;
            left: 878px;
            top: 428px;
            width: 239px;
            height: 30px;
        }
       
        .style59
        {
            position: absolute;
            left: 213px;
            top: 540px;
        }
       
        .style60
        {
            position: absolute;
            left: 378px;
            top: 540px;
        }
       
        .style61
        {
            position: absolute;
            left: 542px;
            top: 541px;
        }
       
        .style62
        {
            position: absolute;
            left: 209px;
            top: 600px;
            width: 1051px;
        }
       
        .style63
        {
            position: absolute;
            left: 1136px;
            top: 772px;
        }
       
        .style64
        {
            position: absolute;
            left: 760px;
            top: 540px;
            height: 30px;
        }
       
        .style65
        {
            position: absolute;
            left: 1095px;
            top: 541px;
        }
       
        .style66
        {
            position: absolute;
            left: 201px;
            top: 195px;
            width: 1063px;
            height: 81px;
        }
        .style67
        {
            position: absolute;
            left: 200px;
            top: 286px;
            width: 503px;
            height: 227px;
        }
        .style68
        {
            position: absolute;
            left: 721px;
            top: 285px;
            width: 543px;
            height: 229px;
        }
        .style70
        {
            position: absolute;
            left: -6px;
            top: 239px;
            width: 1063px;
            height: 46px;
        }
        .style71
        {
            position: absolute;
            left: -7px;
            top: 58px;
            width: 1063px;
            height: 145px;
        }
       
        .style72
        {
            position: absolute;
            top: 250px;
            left: 721px;
            z-index: 1;
            height: 30px;
        }
       
        .style73
        {
            position: absolute;
            top: 467px;
            left: 325px;
            z-index: 1;
            height: 22px;
            width: 185px;
            right: 298px;
        }
       
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <h4>Menu</h4>
        <br>
        <p>
        <a href="frmEmpresa.aspx">Empresa</a>
        <br>
        <a href="frmListaDeEstablecimientos.aspx">Establecimientos</a>
        <br>
        <a href="frmContacto.aspx">Contactos</a>
        <br>
        <a href="frmEmpleados.aspx">Empleados</a>
        <br>
      
        </p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   
    
      <h1>Administracion de Establecimientos</h1>
    <p class="style3">
        <strong>&nbsp;</strong><span class="style4"><strong>&nbsp;&nbsp;&nbsp; </strong></span><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Panel 
          ID="Panel1" runat="server" BorderStyle="Groove" CssClass="style66">
    </asp:Panel>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        </strong>&nbsp;<strong><asp:Panel 
          ID="Panel2" runat="server" BorderStyle="Groove" CssClass="style67">
          <strong>
          <asp:Panel 
          ID="Panel4" runat="server" BorderStyle="Groove" CssClass="style70">
              <strong>
              <asp:Panel ID="Panel7" runat="server" BorderStyle="Groove" CssClass="style71">
              </asp:Panel>
              </strong>
          </asp:Panel>
          </strong>
          <asp:Button ID="Button6" runat="server" CssClass="style72" Height="30px" 
              onclick="Button6_Click" Text="Actualizar Producto" Width="161px" />
    </asp:Panel>
        </strong></p>
        <table class="style12">
            <tr>
                <td class="style13">
                    <asp:Label ID="Label6" runat="server" CssClass="style24" Text="Empresa:"></asp:Label>
&nbsp;&nbsp;<asp:TextBox ID="Label2" runat="server" Font-Bold="True" Width="246px" CssClass="style23"
            Height="30px" BackColor="#DDEDEE"></asp:TextBox>
        &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="style21"
            ControlToValidate="Label2" Font-Bold="True" ForeColor="Red" ValidationGroup="1">*</asp:RequiredFieldValidator>
                    &nbsp;<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="LabelEmpresa" runat="server" Font-Bold="True" Width="244px" 
                        CssClass="style56" BackColor="#DDEDEE"></asp:TextBox>
        &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="style22"
            ControlToValidate="LabelEmpresa" Font-Bold="True" ForeColor="Red" 
            ValidationGroup="1">*</asp:RequiredFieldValidator>
                    &nbsp;<asp:Label ID="Label7" runat="server" CssClass="style25" Text="CUIT:"></asp:Label>
                </td>
                <td class="style18">
                    &nbsp;
                    <span class="style4"><strong>&nbsp;&nbsp;&nbsp;</strong></span></td>
                <td class="style15">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label 
                        ID="Label13" runat="server" CssClass="style39" Font-Bold="True" 
                        ForeColor="Black" Text="Fecha"></asp:Label>
                    &nbsp;&nbsp; <span class="style4"><strong>&nbsp;
        <asp:Label ID="LabelDate" runat="server" CssClass="style40" Font-Bold="True" 
                        Font-Size="Small"></asp:Label>
                    &nbsp;</strong></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><asp:Panel 
          ID="Panel3" runat="server" BorderStyle="Groove" CssClass="style68">
    </asp:Panel>
        </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    &nbsp;<strong><br />
                    </strong></td>
            </tr>
            
            <tr>
                <td class="style16">
                    &nbsp;<asp:Label ID="Label8" runat="server" CssClass="style28" 
                        Text="Establecimiento:"></asp:Label>
                    &nbsp;
        <asp:TextBox ID="TBEstablecimiento" runat="server" Height="30px" CssClass="style27"
                        BackColor="#DDEDEE"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" CssClass="style26"
            ControlToValidate="TBEstablecimiento" Font-Bold="True" ForeColor="Red" 
            ValidationGroup="1">*</asp:RequiredFieldValidator>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label9" runat="server" CssClass="style30" 
                        Text="Numero RNE:"></asp:Label>
                    &nbsp;&nbsp;
        <asp:TextBox ID="TBRNE" CssClass="style29" runat="server" Height="28px" BackColor="#DDEDEE"></asp:TextBox>
&nbsp; &nbsp;&nbsp;
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="DSEstado" CssClass="style31"
            DataTextField="descripcionEstado" DataValueField="idEstado" BackColor="#DDEDEE">
        </asp:DropDownList>
                    &nbsp;&nbsp;&nbsp;<br />
                    <asp:Label ID="Label10" runat="server" CssClass="style32" Text="Estado RNE"></asp:Label>
                    <br />
                    &nbsp;
        <asp:TextBox ID="TBTelefono" runat="server" Height="31px" CssClass="style33" 
                        BackColor="#DDEDEE"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" CssClass="style34"
            ControlToValidate="TBTelefono" Font-Bold="True" ForeColor="Red" 
            ValidationGroup="1">*</asp:RequiredFieldValidator>
                    <asp:Label ID="Label11" runat="server" CssClass="style35" Text="Telefono"></asp:Label>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <strong __designer:mapid="953">
                <b __designer:mapid="952">
           <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" CssClass="style73" 
    ErrorMessage="Ingrese E-Mail Valido" ControlToValidate="TBMail" ForeColor="Red" 
               ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                        ValidationGroup="1"></asp:RegularExpressionValidator>
       </b>
        </strong>
        <asp:TextBox ID="TBMail" runat="server" CssClass="style36" Height="31px" 
                        BackColor="#DDEDEE"></asp:TextBox>
                    <asp:Label ID="Label12" runat="server" CssClass="style37" Text="E-Mail"></asp:Label>
                    <br />
                    <br />
                    <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    <asp:Label ID="Label5" CssClass="style38" runat="server" Font-Bold="True"></asp:Label>
                </td>
                <td class="style17">
                    </td>
                <td class="style10">
                    <strong><br />
                    <br />
                    </strong><span class="style4">&nbsp;
        <asp:TextBox ID="TBPiso" runat="server" Height="30px" CssClass="style48" 
                        BackColor="#DDEDEE"></asp:TextBox>
                    </span>
        <asp:TextBox ID="TBCalle" runat="server" Width="222px" Height="32px" CssClass="style41" 
                        BackColor="#DDEDEE"></asp:TextBox>
                    <span class="style4">
                    <asp:RequiredFieldValidator 
            ID="RequiredFieldValidator5" runat="server" ControlToValidate="TBCalle" CssClass="style42"
            Font-Bold="True" ForeColor="Red" ValidationGroup="1">*</asp:RequiredFieldValidator>
                    &nbsp;&nbsp;<asp:TextBox ID="TBNumCasa" runat="server" Height="30px" CssClass="style43"
                         BackColor="#DDEDEE"></asp:TextBox>
                    &nbsp;<asp:RequiredFieldValidator 
            ID="RequiredFieldValidator6" runat="server" ControlToValidate="TBNumCasa" CssClass="style44"
            Font-Bold="True" ForeColor="Red" ValidationGroup="1">*</asp:RequiredFieldValidator>
                    <asp:Label ID="Label14" runat="server" CssClass="style45" Text="Calle:"></asp:Label>
                    <br />
                    &nbsp;&nbsp;&nbsp;<asp:Label 
                        ID="Label16" runat="server" CssClass="style47" Text="Piso:"></asp:Label>
                    &nbsp;&nbsp;
                    <asp:Label ID="Label17" runat="server" CssClass="style50" Text="Dpto."></asp:Label>
&nbsp;<asp:TextBox ID="TBDpto" runat="server" Height="30px" CssClass="style49" 
                        BackColor="#DDEDEE"></asp:TextBox>
                    &nbsp;<asp:Label ID="Label15" runat="server" CssClass="style46" Text="Nro."></asp:Label>
                    <br />
                    <asp:TextBox ID="TBCodPostal" runat="server" Height="30px" CssClass="style51" 
                        BackColor="#DDEDEE"></asp:TextBox>
                    <asp:Label ID="Label18" runat="server" CssClass="style52" 
                        Text="Cod.Postal"></asp:Label>
                    <br />
                    <br />
                    &nbsp;&nbsp;&nbsp;<asp:Label ID="Label19" runat="server" CssClass="style53" 
                        Text="Barrio"></asp:Label>
                    &nbsp;
                    <asp:DropDownList ID="DropBarrio" runat="server" DataSourceID="DSBarrio" CssClass="style20"
            DataTextField="nombreBarrio" DataValueField="idBarrio" BackColor="#DDEDEE" 
                        AutoPostBack="True" Enabled="False">
        </asp:DropDownList>
                    &nbsp; 
                    <br />
                    <asp:DropDownList ID="DropLocalidad" runat="server" DataSourceID="DSLocalidad" 
            DataTextField="nombreLocalidad" CssClass="style57" DataValueField="idLocalidad" 
                        BackColor="#DDEDEE" AutoPostBack="True" Enabled="False" 
                        onselectedindexchanged="DropLocalidad_SelectedIndexChanged">
        </asp:DropDownList>
                    <asp:Label ID="Label20" runat="server" CssClass="style54" 
                        Text="Localidad"></asp:Label>
                    <br />
                    <asp:DropDownList ID="DropProvincia" runat="server" DataSourceID="DSProvincia" 
            DataTextField="nombreProvincia" DataValueField="idProvincia" CssClass="style58" 
                        BackColor="#DDEDEE" AutoPostBack="True" 
                        onselectedindexchanged="DropProvincia_SelectedIndexChanged">
        </asp:DropDownList>
    &nbsp;<asp:Label ID="Label21" runat="server" CssClass="style55" 
                        Text="Provincia"></asp:Label>
                    <br />
&nbsp;</span></td>
            </tr>
        </table>
    <p>
        &nbsp;&nbsp;<asp:Button ID="Button3" runat="server" CssClass="style59"
            Height="30px" onclick="Button3_Click" Text="Registrar Establecimiento" 
            ValidationGroup="1" Width="155px" />
                    &nbsp;
                    <asp:Button ID="Button4" runat="server" Height="30px" CssClass="style60"
            onclick="Button4_Click1" Text="Modificar Establecimiento" Width="155px" 
            Enabled="False" ValidationGroup="1" />
                    &nbsp;
                    <asp:Button ID="BListaEstabl" runat="server" CssClass="style61" Text="Listar Establecimientos" 
            onclick="Button4_Click" CausesValidation="False" Height="30px" 
            Width="154px" />
                    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="style62"
            DataSourceID="DSEstablPorCliente" Visible="False" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" AllowPaging="True" 
            BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" 
            CellPadding="3" CellSpacing="1" GridLines="None" Height="16px" 
            PageSize="4" EmptyDataText="No Hay Datos Para Mostrar">
            <Columns>
                <asp:CommandField CausesValidation="False" ShowSelectButton="True" 
                    ButtonType="Image" SelectImageUrl="~/Img/ico_chico_ok.png" />
                <asp:BoundField DataField="idEstablecimiento" HeaderText="Nro.Establecimiento" 
                    InsertVisible="False" ReadOnly="True" SortExpression="idEstablecimiento" />
                <asp:BoundField DataField="nombre" HeaderText="Nombre Establecimiento" 
                    SortExpression="nombre" />
                <asp:BoundField DataField="nroRNE" HeaderText="Nro.RNE" 
                    SortExpression="nroRNE" />
                <asp:BoundField DataField="fechaAltaRNE" HeaderText="Fecha Alta RNE" 
                    SortExpression="fechaAltaRNE" />
                <asp:BoundField DataField="razonSocial" HeaderText="Empresa" 
                    SortExpression="razonSocial" />
                <asp:BoundField DataField="cuit" HeaderText="CUIT" SortExpression="cuit" />
                <asp:BoundField DataField="descripcionEstado" HeaderText="Estado" 
                    SortExpression="descripcionEstado" />
            </Columns>
            <EmptyDataRowStyle BackColor="#DDEDEE" BorderStyle="None" 
                HorizontalAlign="Center" />
            <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
            <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#594B9C" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#33276A" />
        </asp:GridView>
    </p>
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p>
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button5" runat="server" onclick="Button5_Click" CssClass="style64"
            Text="Generar Planilla Nº2" Width="160px" />
        <asp:Button ID="BRegProd" runat="server" onclick="BRegProd_Click" CssClass="style65"
            Text="Registrar Producto" Width="161px" Height="30px" Visible="False" />
    </p>
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p>
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" Height="30px" onclick="Button1_Click" CssClass="style63"
            Text="Volver" Width="177px" Visible="False" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:Label ID="Label4" runat="server" Text="l4" Visible="False"></asp:Label>
        <asp:Label ID="Label3" runat="server" Visible="False">l3</asp:Label>
</p>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        DisplayMode="SingleParagraph" Font-Bold="True" ForeColor="Red" 
        HeaderText="Debe Completar los Campos Obligatorios (*)" ShowMessageBox="True" 
        ShowSummary="False" ValidationGroup="1" />
    <p>
        <asp:SqlDataSource ID="DSProvincia" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [T_Provincia]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="DSLocalidad" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT T_Localidad.idLocalidad, T_Localidad.nombreLocalidad, T_Localidad.idProvincia, T_Localidad.habilitado, T_Provincia.idProvincia AS Expr1 FROM T_Localidad INNER JOIN T_Provincia ON T_Localidad.idProvincia = T_Provincia.idProvincia WHERE (T_Localidad.habilitado &gt; 0) AND (T_Localidad.idProvincia = @provincia)" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropProvincia" Name="provincia" 
                    PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:SqlDataSource ID="DSEstado" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [T_Estado]" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"></asp:SqlDataSource>
        <asp:SqlDataSource ID="DSBarrio" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
            SelectCommand="SELECT T_Barrio.idBarrio, T_Barrio.nombreBarrio, T_Barrio.idLocalidad, T_Barrio.habilitado, T_Localidad.idLocalidad AS Expr1 FROM T_Barrio INNER JOIN T_Localidad ON T_Barrio.idLocalidad = T_Localidad.idLocalidad WHERE (T_Barrio.habilitado &gt; 0) AND T_Barrio.idLocalidad = @localidad">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropLocalidad" Name="localidad" 
                    PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:SqlDataSource ID="DSEstablecimiento" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            InsertCommand="INSERT INTO T_Establecimiento(nroRNE, fechaAltaRNE, calle, numeroCalle, piso, departamento, codPostal, idBarrio, idLocalidad, idProvincia, idPais, idEstado, nombre, cuit, numTelefono, mail) VALUES (@nroRNE, @fechaAltaRNE, @calle, @numeroCalle, @piso, @departamento, @codPostal, @idBarrio, @idLocalidad, @idProvincia, @idPais, @idEstado, @nombre, @cuit, @numTelefono, @mail)" 
            
            
            
            SelectCommand="SELECT T_Establecimiento.* FROM T_Establecimiento INNER JOIN T_Barrio ON T_Establecimiento.idBarrio = T_Barrio.idBarrio INNER JOIN T_Localidad ON T_Establecimiento.idLocalidad = T_Localidad.idLocalidad INNER JOIN T_Provincia ON T_Establecimiento.idProvincia = T_Provincia.idProvincia INNER JOIN T_Estado ON T_Establecimiento.idEstado = T_Estado.idEstado" 
            UpdateCommand="UPDATE T_Establecimiento SET nroRNE = @nroRNE, fechaAltaRNE = @fechaAltaRNE, calle = @calle, numeroCalle = @numeroCalle, piso = @piso, departamento = @departamento, codPostal = @codPostal, idBarrio = @idBarrio, idLocalidad = @idLocalidad, idProvincia = @idProvincia, idPais = @idPais, nombre = @nombre, idEstado = @idEstado, cuit = @cuit, numTelefono = @numTelefono, mail = @mail WHERE (idEstablecimiento = @idEstablecimiento)">
            <InsertParameters>
                <asp:Parameter Name="nroRNE" />
                <asp:Parameter Name="fechaAltaRNE" />
                <asp:Parameter Name="calle" />
                <asp:Parameter Name="numeroCalle" />
                <asp:Parameter Name="piso" />
                <asp:Parameter Name="departamento" />
                <asp:Parameter Name="codPostal" />
                <asp:Parameter Name="idBarrio" />
                <asp:Parameter Name="idLocalidad" />
                <asp:Parameter Name="idProvincia" />
                <asp:Parameter Name="idPais" />
                <asp:Parameter Name="idEstado" />
                <asp:Parameter Name="nombre" />
                <asp:Parameter Name="cuit" />
                <asp:Parameter Name="numTelefono" />
                <asp:Parameter Name="mail" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="fechaAltaRNE" />
                <asp:Parameter Name="calle" />
                <asp:Parameter Name="numeroCalle" />
                <asp:Parameter Name="piso" />
                <asp:Parameter Name="departamento" />
                <asp:Parameter Name="codPostal" />
                <asp:Parameter Name="idBarrio" />
                <asp:Parameter Name="idLocalidad" />
                <asp:Parameter Name="idProvincia" />
                <asp:Parameter Name="idPais" />
                <asp:Parameter Name="nombre" />
                <asp:Parameter Name="idEstado" />
                <asp:Parameter Name="cuit" />
                <asp:ControlParameter ControlID="Label3" Name="idEstablecimiento" 
                    PropertyName="Text" />
                <asp:Parameter Name="nroRNE" />
                <asp:Parameter Name="numTelefono" />
                <asp:Parameter Name="mail" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:SqlDataSource ID="DSEstablPorCliente" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
            
            SelectCommand="SELECT T_Establecimiento.idEstablecimiento, T_Establecimiento.nroRNE, T_Establecimiento.fechaAltaRNE, T_Establecimiento.nombre, T_Empresa.cuit, T_Empresa.razonSocial, T_Estado.descripcionEstado FROM T_Establecimiento INNER JOIN T_Empresa ON T_Establecimiento.cuit = T_Empresa.cuit INNER JOIN T_Estado ON T_Establecimiento.idEstado = T_Estado.idEstado WHERE (T_Establecimiento.cuit = @cuit)">
            <SelectParameters>
                <asp:ControlParameter ControlID="LabelEmpresa" Name="cuit" 
                    PropertyName="Text" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSEmpresa" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            
            
            
            SelectCommand="SELECT cuit, nombreComercial FROM T_Empresa WHERE (cuit = @cuit)">
            <SelectParameters>
                <asp:Parameter Name="cuit" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSEstablecimiento2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT T_Establecimiento.*, T_Empresa.*, T_Estado.* FROM T_Establecimiento INNER JOIN T_Empresa ON T_Establecimiento.cuit = T_Empresa.cuit INNER JOIN T_Estado ON T_Establecimiento.idEstado = T_Estado.idEstado
where T_Establecimiento.idEstablecimiento=@idEstablecimiento">
            <SelectParameters>
                <asp:ControlParameter ControlID="Label3" Name="idEstablecimiento" 
                    PropertyName="Text" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSEmpresa2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT T_Empresa.* FROM T_Empresa
where cuit = @cuit">
            <SelectParameters>
                <asp:ControlParameter ControlID="LabelEmpresa" Name="cuit" 
                    PropertyName="Text" />
            </SelectParameters>
        </asp:SqlDataSource>
        </p>
</asp:Content>

